package javabase.enum_learn.use_enum;

/**
 * @Auther: luzhanshi
 * @Date: 2021/2/21 - 02 - 21 - 14:56 
 * @Description: javabase.enum_learn.use_enum
 * @version: 1.0
 */
public class Test {
    public static void main(String[] args) {
        Persion persion = new Persion();
        persion.setName("李沁");
        persion.setAge(18);
        persion.setSex(Gender.女);//在入口处即限制了参数
        System.out.println(persion);


        Gender gender = Gender.女;
        switch (gender){
            case 女:
                System.out.println("是个女孩");
                break;
            case 男:
                System.out.println("是个男孩");
                break;
        }
    }
}
